<div class="groups security form">
<h2><?php __('Group Security');?></h2>
<?php echo $form->create('Group', array('action'=>'security')); ?>
<fieldset>
    <?php $ci = -1; ?>
    <?php foreach ($acos as $ai=>$aco): ?>
        <?php if($aco['type'] == 'action'): ?>
            <dl>
                <dt><?php echo $aco['alias']; ?></dt>
                <dd><?php echo $form->radio(
                    'Group.SecurityAccess.'.$aco['id'],
                    array('allow' =>'<span class="allow">Allow</span>', 'deny' =>'<span class="deny">Deny</span>'),
                    array(/*'default' => $aco['selected'], */'legend' => false, 'class'=>'radio')); ?>
                </dd>
            </dl>
            <?php if(isset($acos[$ai+1]) && $acos[$ai+1]['type'] == 'controller'): ?>
                </div>
            <?php endif; ?>
            <?php if($ci % 3 == 2): ?>
                <br class="clear" name="<?php echo $ci;?>"/>
            <?php endif; ?>
        <?php else: ?>
            <div class="group" id="security_group_<?php echo $aco['alias']; ?>">
            <h4><?php echo $aco['alias']; ?></h4>
            <?php $ci++; ?>
        <?php endif; ?>
    <?php endforeach; ?>
    <br class="clear"/><br class="clear"/>
    <?php echo $form->hidden('Group.id'); ?>
    <?php echo $form->submit(__('Save Changes', true), array('class'=>'submit attention')); ?>
</fieldset>
<?php echo $form->end(); ?>
</div>
<?php //debug($acos); ?>
</div>